cd_link creates a set of symbolic links in the target_directory to the files/directories stored on a CD-ROM created by Young Minds' CD-ROM Publishing Software. The program uses the cdrom_directory to search for a translation file (normally 00_TRANS.TBL). If found, the program uses the file to build a set of symbolic links in the target_directory to the files (and directories, if the -r option is given) in the cdrom_directory. If the target_directory is not specified on the command line, the symbolic links are built in the current working directory.
The names given to the links in the target_directory are the original UNIX+ names that the files on the CD-ROM had before they were formatted to conform to the ISO9660 specification. This gives you the ability to use the files on the CD-ROM as they were originally intended to be used under a UNIX+ filesystem. For example, if you had a source distribution on CD-ROM, you could use cd_link to build the original UNIX+ names in a writable partition in order to make the executables.
Since it is often desirable to have the original UNIX+ names in a writable partition, cd_link will also build links for a Rock Ridge disc.
The example below shows how to create the symbolic links necessary to recreate the directory tree for gnuplot in the directory /cd-rom_disc) :
Because we wish our CD-ROM publications to be usefull on as many platforms as possible, cd_link is distributed in source form. To make the executables you will need a C compiler (which is a standard part of most UNIX systems). First, copy cd_link.c from the CD-ROM onto a hard disk. On most systems this will look somehthing like this:
The quotes around cd_link.c;1 above are necessary to prevent the shell from interfering with the operation. Note that on some platforms the ";1" will not be needed because the CD-ROM filesystem driver may automatically strip it off.
After you have a copy of cd_link.c on your hard disk, you need to compile it. Type:
This will create an executable file named cd_link. On some platforms it may be necessary to link in a BSD compatibility library. HP-UX machines are in this catagory. In this case you should instead type:
Once you have successfully created the executable you may want to install it in a commonly accessible location like /usr/local/bin.
While all filenames on CD-ROM discs from Young Minds are stored using upper case letters, the CD-ROM filesystem driver for the Sun workstation automatically translates all upper case filename characters to lower case. cd_link automatically detects several types of translations that are commonly performed by CD-ROM filesystem drivers, so this should cause no problems.
The directory cdrom_directory need not reside on a CD-ROM disc, as long as it contains a copy of all files from a directory on a CD-ROM disc (and that directory's sub-directories, if you wish to use the -r option).
While the current version of Young Minds' CD-ROM Publishing Software generates translation tables entries for block device nodes, character device nodes, pipes, and sockets (denoted B, C, P, and S), the current version of cd_link ignores these entries as there is not yet a well defined, machine independent mapping for these entries.
While there is no reason why the program could not be useful in making directory trees of symbolic links to arbitrary directories, the required translation file only allows the program to be used on directory (or directory trees) that contain correct translation files.
+ UNIX is a trademark of Bell Laboratories.